Make `print-new-snapshot` fail on 403
authorTamir Duberstein <tamird@gmail.com>
Sat, 4 Apr 2015 23:18:47 +0000 (16:18 -0700)
committerTamir Duberstein <tamird@gmail.com>
Sat, 4 Apr 2015 23:18:47 +0000 (16:18 -0700)
src/etc/print-new-snapshot.py

index 8c7d0e898b70d35633eb95b5ea8aca1009429fc7..0c5e52a3245fb97491e9ae66c33df67ee14fb675 100644 (file)
@@ -25,7 +25,7 @@ for platform in sorted(snaps):
     tarball = 'cargo-nightly-' + triple + '.tar.gz'
     url = 'https://static-rust-lang-org.s3.amazonaws.com/cargo-dist/' + date + '/' + tarball
     dl_path = "target/dl/" + tarball
-    ret = subprocess.call(["curl", "-s", "-o", dl_path, url])
+    ret = subprocess.call(["curl", "-f", "-s", "-o", dl_path, url])
     if ret != 0:
         raise Exception("failed to fetch url")
     h = hashlib.sha1(open(dl_path, 'rb').read()).hexdigest()